package com.example.e_comm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.e_comm.dto.UserDTO;
import com.example.e_comm.entity.User;

import java.util.List;

public interface UserService extends IService<User> {
    boolean create(UserDTO dto);
    boolean remove(Long id);
    User get(Long id);
    IPage<User> pageUsers(Page<User> page);
    IPage<User> pageUsersWithCondition(Page<User> page, String keyword);
    List<User> list();
    boolean register(User user);
    String login(String username, String password);
    User getUserByToken(String token);
    boolean logout(String token);
    boolean validateToken(String token);
}